/*
 * @Author: your name
 * @Date: 2021-07-21 19:20:40
 * @LastEditTime: 2021-07-21 21:48:43
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \noproblemi:\实训东软H5\仓库\h5_2002\编码\cat\src\router\index.js
 */
import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue'
import NecessityGood from '../views/necessity/NecessityGood';
import Login from '../views/login/Login.vue'
import CatShop from '../views/shop/CatShop.vue'
import CatShopHome from '../views/shop/CatShopHome.vue'
import LoginId from '../views/login/LoginId.vue'
import FeedBack from '../views/feedback/FeedBack.vue'
import MenuHelp from '../views/feedback/MenuHelp.vue'
import MenuHelp2 from '../views/feedback/MenuHelp2.vue'
import Inquiry from '../views/inquiry/Inquiry'
import InServe1 from '../views/inquiry/InServe1'
import InServe2 from '../views/inquiry/InServe2'
import InServe3 from '../views/inquiry/InServe3'
import InServe4 from '../views/inquiry/InServe4'
import InServe5 from '../views/inquiry/InServe5'
import InServe6 from '../views/inquiry/InServe6'
import InServe7 from '../views/inquiry/InServe7'
import Hospital from '../views/inquiry/Hospital'

import SHome from "../views/SHome";
import DocumentPlaceholder from "../views/doc/DocumentPlaceholder";
import Sterilization from "../views/doc/Sterilization";


const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    children: [
      {
        path: '/goods',
        name: 'NecessityGoods',
        component: NecessityGood
      }
    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/shop',
    name: 'Shop',
    component: CatShop,
    children: [
      {
        path: '',
        name: 'CatShopHome',
        component: CatShopHome
      },
      {
        path: 'store/:kind',
        name: 'CatShopStore',
        component: () => import('../views/shop/CatShopStore.vue'),
      },
      {
        path: 'buytip',
        name: 'CatShopBuyTip',
        component: () => import('../views/shop/CatShopBuyTip.vue')
      },
      {
        path: 'knowledge',
        name: 'CatShopKnowledge',
        component: () => import('../views/shop/CatShopKnowledge.vue')
      },
      {
        path: 'service',
        name: 'CatShopService',
        component: () => import('../views/shop/CatShopService.vue')
      },
    ]
  },
  {
    path: '/loginid',
    name: 'LoginId',
    component: LoginId,
  },
  {
    path: '/feedback',
    name: 'FeedBack',
    component: FeedBack,
    children: [
      {
        path: '/menuhelp',
        name: 'MenuHelp',
        component: MenuHelp
      },
      {
        path: '/menuhelp2',
        name: 'MenuHelp2',
        component: MenuHelp2
      },
    ]
  },
  {
    path: '/cater/diagnose',
    name: 'Inquiry',
    component: Inquiry,
    children: [
      {
        path: '/InServe1',
        name: 'InServe1',
        component: InServe1
      },
      {
        path: '/InServe2',
        name: 'InServe2',
        component: InServe2
      },
      {
        path: '/InServe3',
        name: 'InServe3',
        component: InServe3
      },
      {
        path: '/InServe4',
        name: 'InServe4',
        component: InServe4
      },
      {
        path: '/InServe5',
        name: 'InServe5',
        component: InServe5
      },
      {
        path: '/InServe6',
        name: 'InServe6',
        component: InServe6
      },
      {
        path: '/InServe7',
        name: 'InServe7',
        component: InServe7
      },
    ]
  },
  {
    path: '/Hospital',
    name: 'Hospital',
    component: Hospital
  },
  {
    path: '/catinfo',
    name: 'CatInfo',
    component: () => import(/* webpackChunkName: "catinfo" */'../views/catInfo/CatInfo.vue'),
    redirect: '/catinfo/maininfo',
    children: [
      {
        path: '/catinfo/maininfo',
        name: 'MainInfo',
        component: () => import(/* webpackChunkName: "catinfo" */'../views/catInfo/MainInfo.vue')
      },
      {
        path: '/catinfo/feed',
        name: 'Feed',
        component: () => import(/* webpackChunkName: "catinfo" */'../views/catInfo/Feed.vue')
      },
      {
        path: '/catinfo/morepic',
        name: 'MorePic',
        component: () => import(/* webpackChunkName: "catinfo" */'../views/catInfo/MorePic.vue')
      }
    ]
  },

  {
    name: 'SHome',
    path: '/cater/beauty',
    component: SHome,

    children: [
      {
        path: '/doc/1',
        name: '绝育预约',
        component: Sterilization
      },
      {
        path: '/doc/2',
        name: '相亲配种',
        component: DocumentPlaceholder
      },
      {
        path: '/goodsDesc',
        component: () => import(/* webpackChunkName: "dashboard" */ '../components/goodsDesc.vue'),
        meta: { title: '商品详情' }
      },
      {
        name: "doctorInfo",
        path: '/doctorInfo',
        component: () => import(/* webpackChunkName: "dashboard" */ '../components/doctorInfo.vue'),
        meta: { title: '医生详情' }
      },
    ]
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
